package com.mazaiting.mail.api.fallback;

import com.mazaiting.common.core.domain.result.Result;
import com.mazaiting.common.core.domain.result.ResultCode;
import com.mazaiting.mail.api.IMailSendFeignClient;
import com.mazaiting.mail.dto.MailAlarmDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 邮件降级
 *
 * @author mazaiting
 * @create_time 2022/9/19 00:14
 */
@Slf4j
@Component
public class MailSendFeignFallbackClient implements IMailSendFeignClient {

    @Override
    public Result<Boolean> alarm(MailAlarmDTO mailAlarmDTO) {
        log.error("远程调用系统服务异常-预警失败");
        return Result.failed(ResultCode.FEIGN_DEGRADATION);
    }

}
